package com.design.pattern.behaviour.state;

import lombok.Data;

/**
 * @Author hanyuanlai
 * @Date 2022/9/13
 */
@Data
public class Car {
    private CarState carState;

    public Car(CarState carState) {
        this.carState = carState;
    }

    public void openDoor() {
        carState.openDoor();
    }

    public void closeDoor() {
        carState.closeDoor();
    }

    public void drive() {
        carState.drive();
    }

    public void stop() {
        carState.stop();
    }
}
